var AmtAssistant = Class.create(AbstractModule, {


setupWidgets: function() {

		//About
		this.controller.setupWidget(Mojo.Menu.appMenu, {
			omitDefaultItems: true
		}, {
			visible: true,
			items: [
      		Mojo.Menu.editItem,
			{ label: "Disclaimer", command: "do-disclaimer" },					
				{ label: "License", command: "do-license" },
				{ label: "Help", command: "do-help" }
			]
		});	

	this.toggleModel = {
		ageCHK: false
			};
	this.toggleModel = {
			timeCHK: false
			};
			
	this.toggleModel = {
			yearCHK: false
			};						
	this.toggleModel = {
			placeCHK: false
			};
			
	this.toggleModel = {
			bdayCHK: false
			};
			
	this.toggleModel = {
			fwwCHK:false		
			};									

	this.toggleModel = {
			kingCHK:false		
			};				

	this.toggleModel = {
			recogCHK:false		
			};	
	this.toggleModel = {
			countCHK:false		
			};		
	this.toggleModel = {
			addressCHK:false		
			};									


	this.controller.setupWidget("ageCHK", {
			modelProperty: "ageCHK"
		}, this.toggleModel);
	this.controller.setupWidget("timeCHK", {
			modelProperty: "timeCHK"
		}, this.toggleModel);
	this.controller.setupWidget("yearCHK", {
			modelProperty: "yearCHK"
		}, this.toggleModel);
	this.controller.setupWidget("placeCHK", {
			modelProperty: "placeCHK"
		}, this.toggleModel);
	this.controller.setupWidget("bdayCHK", {
			modelProperty: "bdayCHK"
		}, this.toggleModel);
	this.controller.setupWidget("fwwCHK", {
			modelProperty: "fwwCHK"
		}, this.toggleModel);
	this.controller.setupWidget("kingCHK", {
			modelProperty: "kingCHK"
		}, this.toggleModel);		
	this.controller.setupWidget("recogCHK", {
			modelProperty: "recogCHK"
		}, this.toggleModel);
	this.controller.setupWidget("countCHK", {
			modelProperty: "countCHK"
		}, this.toggleModel);
	this.controller.setupWidget("addressCHK", {
			modelProperty: "addressCHK"
		}, this.toggleModel);					
},



	calculate: function() {
	var result = amtcalc(this.toggleModel.ageCHK,this.toggleModel.timeCHK,this.toggleModel.yearCHK,this.toggleModel.placeCHK,this.toggleModel.bdayCHK,this.toggleModel.fwwCHK,this.toggleModel.kingCHK,this.toggleModel.recogCHK,this.toggleModel.countCHK,this.toggleModel.addressCHK);
  amt=result.amtscore;
	return "The AMT score is " + result.amtscore + " which suggests " +result.severity;
	}
});





